//
//  ScrollerViewTextItem.swift
//  Scroller_swift
//
//  Created by CarlsonLee on 2020/4/22.
//  Copyright © 2020 CarlsonLee. All rights reserved.
//

import UIKit

class ScrollerViewTextItem: ScrollerViewItem {
    var lab: UILabel?
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        initSubviews()
    }
    
    private func initSubviews() {
        lab = UILabel(frame: self.bounds)
        lab?.font = UIFont(name: "PingFangSC-Regular", size: 15)
        lab?.textAlignment = .left
        contentView.addSubview(lab!)
    }
    
    override func setData(_ urlName: String) {
        
        lab?.text = urlName
    }
}
